// Coffee.java
class Coffee {
    // 属性（字段）
    private String name;
    private double price;
    private String description;
    private int energyBoost; // 咖啡提供的能量提升值
    
    // 构造方法
    public Coffee(String name, double price, String description, int energyBoost) {
        this.name = name;
        this.price = price;
        this.description = description;
        this.energyBoost = energyBoost;
    }
    
    // Getter和Setter方法（封装）
    public String getName() {
        return name;
    }
    
    public void setName(String name) {
        this.name = name;
    }
    
    public double getPrice() {
        return price;
    }
    
    public void setPrice(double price) {
        this.price = price;
    }
    
    public String getDescription() {
        return description;
    }
    
    public int getEnergyBoost() {
        return energyBoost;
    }
    
    // 自定义方法
    public void displayInfo() {
        System.out.println(name + " - ¥" + price);
        System.out.println("   " + description);
        System.out.println("   能量提升: +" + energyBoost + "%");
    }
}

